<template>
    <Table :columns="columns1" :data="data2" :height="700"></Table>
</template>
<script>
  export default {
    data () {
      return {
        columns1: [
          {
            title: 'Name',
            key: 'name'
          },
          {
            title: 'Age',
            key: 'age'
          },
          {
            title: 'Address',
            key: 'address'
          }
        ],

        data2: []

      }
    },
    mounted () {
      this.setData(10000)
    },
    methods: {
      handleReachBottom () {
        return new Promise(resolve => {
          setTimeout(() => {
            const last = this.data2[this.data2.length - 1];
            for (let i = 1; i < 11; i++) {
              this.data2.push(last + i);
            }
            resolve();
          }, 2000);
        });
      },
      setData (num) {
        this.data2 = Array.from({ length: num }, (_, idx) => ({
          name: 1,
          age: idx,
          address: 'Ottawa No. 2 Lake Park',
          date: '2016-05-03',
        }))
        // this.$refs.plTable.reloadData(data)
      },

    }
  }
</script>
